package com.atguigu;

import java.util.Scanner;

/**
 *      九九乘法表
 *
 * @author : leimingchao
 * @date Date : 2021年07月20日 22:05
 */
public class NineNineTableTest {

    public static void main(String[] args) {
        for (int i = 1; i <= 9; i++) {
            for (int j = 1; j <= i;j++) {
                System.out.print(i + "*" + j + "=" + i * j + "\t");
            }
            System.out.println();
        }
        System.out.println("**************************");
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入几几乘法表的一个整数：");
        int number = scanner.nextInt();
        for (int i = 1; i <= number; i++) {
            for (int j = 1; j <= i;j++) {
                System.out.print(i + "*" + j + "=" + i * j + "\t");
            }
            System.out.println();
        }

    }
}
